# 带多个参数的装饰器的的使用
from functools import partial

def descFun(funx):
    def InnerFun(*args):
        print(InnerFun.__name__)
        funx(*args)
    return InnerFun
@descFun
def fun1(name):
    print("I am fun1-->",name)
@descFun
def fun2(name,age):
    print("I am fun2 -->",name,",age-->",age)
fun1("asd")
fun2("asqww",12)
print("----偏函数的使用-------")
aaTest="101010"
aaTest2="1234"
print("转化为10进制:",int(aaTest,base=2))
print("10进制转化为8进制:",int(aaTest,base=8))
newInt=partial(int,base=2)
print("偏函数简化:",newInt(aaTest))